
import { createRouter, createWebHistory } from "vue-router"
import Profile from '../views/profile/index.vue'//创建配置信息

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
        path:'/home',
        name:'home',
        component: ()=>import('../views/home.vue'),
         meta:{title:'首页',show:true,icon:'House',useFrame:false}
    },
    {
        path:'/',
        name:"login",
        component: ()=> import('../views/Login.vue'),
        // show:true  代表要不要在菜单中展示 ， useFrame 为true 表示是全屏展示 false 不是全全屏
        meta:{title:'登录操作',show:false,icon:'',useFrame:true}
    },
      {
        path:'/moveShow',
        name:"moveShow",
        component: ()=> import('../views/MoveShow.vue'),
        // show:true  代表要不要在菜单中展示 ， useFrame 为true 表示是全屏展示 false 不是全全屏
        meta:{title:'移动端页面',show:true,icon:'Iphone',useFrame:true}
    },
    {
        path:'/Fenlei',
        name:"Fenlei",
        component: ()=> import('../views/Fenlei.vue'),
        // show:true  代表要不要在菜单中展示 ， useFrame 为true 表示是全屏展示 false 不是全全屏
        meta:{title:'藏品详情',show:false,icon:'Iphone',useFrame:true}
    },
    {
        path:'/book',
        component:()=> import('../views/book/Index.vue'),
        meta:{title:'小说管理',show:true,icon:'Grid'},
        children : [
            {
                path:'/book/list',
                name:'book-list',
                component:()=> import('../views/book/List.vue'),
                 meta:{title:'小说列表',show:true,icon:'List'}
            }
         ]
    },
      {
        path:'/category',
        component:()=> import('../views/category/Index.vue'),
        meta:{title:'小说分类',show:true,icon:'Tickets'},
        children : [
            {
                path:'/category/listman',
                name:'category-listman',
                component:()=> import('../views/category/Listman.vue'),
                 meta:{title:'男频',show:true,icon:'List'}
            },
            {
                path:'/category/listgirl',
                name:'category-listgirl',
                component:()=> import('../views/category/listgirl.vue'),
                 meta:{title:'女频',show:true,icon:'List'}
            }
         ]
    },
    {
      path: '/profile',
      name: 'profile',
      component: Profile,
      meta: {
        useFrame: true  // 根据你的需求设置是否使用框架布局
      }
    }
  ]
})
export default router